module Forms
  module Interface
    module Forms

     def self.included(base)
       base.class_eval do
          attr_accessor :form
          alias_method :forms, :form
          protected
            def load_default_form_regions
              returning OpenStruct.new do |form|
                form.edit = Radiant::AdminUI::RegionSet.new do |edit|
                  edit.main.concat %w{form}
                  edit.form.concat %w{inputs meta parts foot}
                  edit.foot.concat %w{buttons timestamp}
                end
                form.new = form.edit
                form.index = Radiant::AdminUI::RegionSet.new do |index|
                  index.body.concat %w{icon title modify}
                  index.foot.concat %w{buttons pagination}
                end
              end
            end
        end
      end
      
    end    
  end
end